﻿#ifndef FACADE_H
#define FACADE_H

#include <QDialog>
#include <QMessageBox>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QString>
#include <QSqlQuery>

namespace Ui {
class Facade;
}

class Facade : public QDialog
{
    Q_OBJECT

public:
    explicit Facade(QWidget *parent = 0);
    ~Facade();

    void cleanTable();
    void insertItem(const QString &name,const int &num);
    void getMaterial(const QString &name);
    void insertRecord(const QString &name, const double &num);
    void sumResult();

private slots:
    void on_btn_submit_clicked();

    void on_btn_sum_clicked();

private:
    Ui::Facade *ui;
    QString name;
    int num;

    QString mat_name;
    double mat_num;
};

#endif // FACADE_H
